/**
 * Copyright  (c) 2009-2010 Wilmar IT Service,  Inc.   
 * All  rights  reserved. 
 */
package test.procedure;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import oracle.jdbc.OracleConnection;

import junit.framework.TestCase;

/**
 * @author MaKuBEX Email:makubexnet@gmail.com
 * @version 1.0.0 May 17, 2010
 * @since 1.0.0
 * 
 */
public abstract class BaseTester extends TestCase {
	protected static String ORACLE_DATABASE_DRIVER = "oracle.jdbc.OracleDriver";
	protected static String ORACLE_DATABASE_URL = "jdbc:oracle:thin://@10.229.14.205:1521:wfs";
	protected static String ORACLE_DATABASE_USERNAME = "wfs";
	protected static String ORACLE_DATABASE_PASSWORD = "a";

	protected Connection getConnection() {
		Connection cn = null;
		try {
			Class.forName(ORACLE_DATABASE_DRIVER);
			cn = DriverManager.getConnection(ORACLE_DATABASE_URL,
					ORACLE_DATABASE_USERNAME, ORACLE_DATABASE_PASSWORD);
			((OracleConnection) cn).setCreateStatementAsRefCursor(true);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return cn;
	}
}
